import request from '@/utils/request'
// 获取负责人信息
export const grtList = () => request.get('/sys/user/simple')
// 获取员工列表
export const getEmployees = (params) => request.get('/sys/user', { params })
// 新增
export const postEmployees = (data) => request.post('/sys/user', data)
// 删除
export const deleteEmployees = (id) => request.delete(`/sys/user/${id}`)
// 批量新增
export const postImport = (data) => request.post(`/sys/user/batch`, data)
// 修改
export const putEmployees = (data) => request.put(`/sys/user/${data.id}`, data)

// 给员工分配角色
export function assignRoles(data) {
  return request({
    url: `/sys/user/assignRoles`,
    method: 'put', // 全量修改
    data
  })
}
